# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit vala

DESCRIPTION="Library containing the completion engine for Vala language"
HOMEPAGE="http://code.google.com/p/vtg/"

SRC_URI="http://vtg.googlecode.com/files/vtg-${PV}.tar.bz2 -> \
	${PN}-${PV}.tar.bz2"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="-debug"

RDEPEND=">=dev-libs/glib-2.28:2
	>=dev-lang/vala-0.11.0:0.12"
DEPEND="${RDEPEND}"

VALA_REQUIRED_VERSION="0.12"

src_unpack() {
	unpack ${A}
	mv "${WORKDIR}/vtg-${PV}" "${WORKDIR}/${PN}-${PV}"
}

src_configure() {
	econf \
		--disable-vtg-plugin \
		--disable-gen-project \
		--enable-afrodite \
		$(use_enable debug)
}

src_install() {
	DESTDIR="${D}" emake install
	mv "${D}/usr/share/doc/vtg/" "/${D}/usr/share/doc/afrodite"
}
